package mhcs.client;

import mhcs.shared.FieldVerifier;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.SplitLayoutPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class MHCS implements EntryPoint {
	
	//Variable to access from all widgets instantiated in the MHCS onModuleLoad...
	public static ModuleSet dataSet = new ModuleSet();
	public static SoundOutput soundOutput;
	/**
	 * The message displayed to the user when the server cannot be reached or
	 * returns an error.
	 */
	private static final String SERVER_ERROR = "An error occurred while "
			+ "attempting to contact the server. Please check your network "
			+ "connection and try again.";

	/**
	 * Create a remote service proxy to talk to the server-side Greeting service.
	 */
	private final GreetingServiceAsync greetingService = GWT
			.create(GreetingService.class);

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {

		//Instantiates a new ModuleSet, reference this dataSet from any module/widget by calling MHCS.dataSet
		//dataSet = new ModuleSet();
		soundOutput = new SoundOutput();
		
		//Create a loginPopup class widget to display on the main screen for the first screen to display
		LoginPopup loginPopup = new LoginPopup();
	    RootPanel.get().add(loginPopup);
		
//		SplitLayoutPanel sp = new SplitLayoutPanel();
//		sp.addWest(new AddModule(), 200);
//		sp.addSouth(new WeatherWidget(), 150);
//		sp.addSouth(new SaveLoadConfig(), 100);
//		sp.add(new LandingMap());
//		RootLayoutPanel.get().add(sp);

	}
}
